package com.huobao.yunying.activitys;

import java.util.ArrayList;
import java.util.List;

import org.xutils.view.annotation.ViewInject;

import com.ab.view.sliding.AbSlidingTabView;
import com.huobao.yunying.base.HuobaoBaseActivity;
import com.huobao.yunying.fragments.Save_Progect;
import com.huobao.yunying.fragments.Save_Store;
import com.huobao.zhangying.R;

import android.app.Fragment;
import android.graphics.Color;

public class Act_MySave extends HuobaoBaseActivity {

	@ViewInject(R.id.tabview)
	private AbSlidingTabView mAbSlidingTabView;

	@Override
	protected int getContentView() {
		// TODO Auto-generated method stub
		return R.layout.layout_mysave;
	}

	@Override
	protected String getTitleText() {
		// TODO Auto-generated method stub
		return "我的收藏";
	}

	@Override
	protected void init() {
		// 缓存数量
		mAbSlidingTabView.getViewPager().setOffscreenPageLimit(5);
		mAbSlidingTabView.setTabTextColor(Color.BLACK);
		mAbSlidingTabView.setTabSelectColor(Color.rgb(30, 168, 131));
		mAbSlidingTabView.setTabBackgroundResource(R.drawable.tab_bg);
		mAbSlidingTabView.setTabLayoutBackgroundResource(R.mipmap.slide_top);
		mAbSlidingTabView.setTabPadding(20, 8, 20, 8);
		List<String> tabTexts = new ArrayList<String>();
		tabTexts.add("收藏商品");
		tabTexts.add("收藏店铺");
		List<Fragment> mFragments = new ArrayList<Fragment>();
		mFragments.add(new Save_Progect());
		mFragments.add(new Save_Store());
		mAbSlidingTabView.addItemViews(tabTexts, mFragments);
		mAbSlidingTabView.setTabPadding(20, 8, 20, 8);
	}

}
